<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%>
<head>
    <title><fmt:message key="user" /></title>
</head>
<body>
    <h1><fmt:message key="user" /></h1>
    <table>
        <tbody>
   
            <tr>
                <th><fmt:message key="user_loginName" /></th>
                <td>
                    <c:out value="${user.loginName}"/>                
				</td>
                <th><fmt:message key="user_nickName" /></th>
                <td>
                    <c:out value="${user.nickName}"/>     
				</td>
            </tr>
            <tr>
                <th><fmt:message key="user_createDate" /></th>
                <td>
                    <c:out value="${user.createDate}"/>                
				</td>
                <th><fmt:message key="user_firstName" /></th>
                <td>
                    <c:out value="${user.firstName}"/>                
				</td>
            </tr>
            <tr>
                <th><fmt:message key="user_male" /></th>
                <td>
					<c:out value="${user.male}"/>  
				</td>
                <th><fmt:message key="user_birthDay" /></th>
                <td>
					<c:out value="${user.birthDay}"/>  
				</td>
            </tr>
            <tr>
                <th><fmt:message key="user_email" /></th>
                <td>
                    <c:out value="${user.email}"/>                
				</td>
                <th><fmt:message key="user_active" /></th>
                <td>
                    <c:out value="${user.active}"/>                
				</td>
            </tr>
            <tr>
                <th><fmt:message key="user_lastLoginDate" /></th>
                <td>
                    <c:out value="${user.lastLoginDate}"/>                
				</td>
                <th><fmt:message key="user_lastLoginIp" /></th>
                <td>
                    <c:out value="${user.lastLoginIp}"/>                
				</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="2">
                    <div class="buttons">
                        <c:url var="updateUrl" value="/domain/user/updateForm">
                            <c:param name="user.inode" value="${user.inode}"/>
                        </c:url>
                        <a href="${updateUrl}"><span><fmt:message key="label.link.update"/></span></a>
                        <c:url var="confirmDeleteUrl" value="/domain/user/confirmDelete">
                            <c:param name="user.inode" value="${user.inode}"/>
                        </c:url>
                        <a id="confirmDeleteUrl" href="${confirmDeleteUrl}"><span><fmt:message key="label.link.delete"/></span></a>
                        <script type="text/javascript">
                            Spring.addDecoration(new Spring.AjaxEventDecoration({
                                elementId: "confirmDeleteUrl",
                                event: "onclick",
                                popup: "true",
                                params: { decorator: "none" }
                            }));
                        </script>
                    </div>
                </td>
            </tr>
        </tfoot>
    </table>
    <h2><fmt:message key="label.related.content"/></h2>
	<table class="listEntities">
		<thead>
			<tr>
				<th scope="col"><fmt:message key="order_shippingFirstName"/></th>
				<th scope="col"><fmt:message key="order_status"/></th>

				<th scope="col"><fmt:message key="order_createDate"/></th>
				<th scope="col"><fmt:message key="order_user"/></th>
				<th scope="col"><fmt:message key="order_shippingCity"/></th>
				<th scope="col"><fmt:message key="order_totalPrice"/></th>
				<th scope="col">&nbsp;</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${orders}" var="order" varStatus="status">
			<tr>
				<td>
					<c:out value="${order.shippingFirstName}"/>
				</td>
				<td>
					<c:out value="${order.statusName}"/>
				</td>
				<td>
					<c:out value="${order.createDate}"/>
				</td>
				<td>
					<c:out value="${order.user.loginName}"/>
				</td>
				<td>
					<c:out value="${order.shippingCity}"/>
				</td>
				<td>
					<c:out value="${order.totalPrice}"/>
				</td>
				<td>
					<c:url var="showUrl" value="/domain/order/show">
						<c:param name="order.inode" value="${order.inode}"/>
					</c:url>
					<c:url var="updateUrl" value="/domain/order/updateForm">
						<c:param name="order.inode" value="${order.inode}"/>
					</c:url>
					<c:url var="confirmDeleteUrl" value="/domain/order/confirmDelete">
						<c:param name="order.inode" value="${order.inode}"/>
					</c:url>
					<a class="actionShow" href="${showUrl}"><fmt:message key="label.link.show"/></a>
					<a class="actionUpdate" href="${updateUrl}"><fmt:message key="label.link.update"/></a>
					<a class="actionDelete orderAjaxDelete" id="confirmDeleteUrl${status.index}" href="${confirmDeleteUrl}"><fmt:message key="label.link.delete"/></a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="17">
					<p>
						<tags:navigation pager="${pagerDisplay}" url="${searchUrl}" form="${orderSearchForm}"/>
					</p>
				</td>
			</tr>
		</tfoot>
	</table>
</body>
